package com.echoplots.security.pojo;

import java.awt.image.BufferedImage;
import java.time.LocalDateTime;

public class ImageCodeEntity{
	private BufferedImage image;
	private ImageCode imageCode;
	
    public ImageCodeEntity(BufferedImage image, ImageCode imageCode) {
        this.image = image;
        this.imageCode = imageCode;
    }

    public boolean isExpire() {
        return LocalDateTime.now().isAfter(imageCode.getExpireTime());
    }

	public BufferedImage getImage() {
		return image;
	}

	public void setImage(BufferedImage image) {
		this.image = image;
	}

	public ImageCode getImageCode() {
		return imageCode;
	}

	public void setImageCode(ImageCode imageCode) {
		this.imageCode = imageCode;
	}

	
}
